<template>
  <div>
    <router-view />
    <play-controller></play-controller>
  </div>
</template>

<script>
import playController from "@/components/playController.vue";
export default {
  components: {
    playController,
  },
  mounted() {
    let userStr = localStorage.userData;
    if (userStr) {
      let userData = JSON.parse(userStr);
      console.log(userData);
      this.$store.commit("setUser", userData);
    }
    // let userData = JSON.parse(localStorage.userData);
    // console.log(userData);
    // this.$store.commit('setUser',userData)
  },
};
</script>
<style lang="less">
* {
  margin: 0;
  padding: 0;
  // 盒子不会因为内边距而变大
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
.icon {
  width: 0.3rem;
  height: 0.3rem;
}
a {
  color: #333;
  text-decoration: none;
}
</style>
